using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace XCZProject
{
    [CreateAssetMenu]
    public class LevelConfig : ScriptableObject
    {
        [SerializeField]
        public List<EnemyWaveGroup> EnemyWaveGroups = new List<EnemyWaveGroup>();
    }

    /// <summary>
    /// 敌人波次分组数据
    /// </summary>
    [Serializable]
    public class EnemyWaveGroup
    {
        public string Name;
        [TextArea]
        public string Description=String.Empty;
        [SerializeField]
        public List<EnemyWave> Waves = new List<EnemyWave>();
    }
    
    /// <summary>
    /// 敌人波次
    /// </summary>
    [Serializable]
    public class EnemyWave
    {
        // 名称
        public string Name;
        // 是否激活状态
        public bool Active;

        // 当前波次中每个敌人的生成间隔
        public float GenerateDuration = 1;
        // 敌人预设体
        public GameObject enemyPrefab;
        // 持续时间
        public float Seconds = 10;

        // 血量倍率
        public float HpScale = 1.0f;
        // 速度倍率
        public float SpeedScale = 1.0f;
    }
}
